All Packages Class Hierarchy This Package Previous Next Index
Object | +----com.symantec.itools.vcafe.openapi.VisualObject
VisualObject
has a set of VisualProperties
.
A plug-in can obtain a list, or library, of these objects from a VisualProject
by using the
getObjectLibrary
method. A plug-in can use the methods in the VisualObject
class to update
properties and other attribues.
The implementation of all of VisualObject
's abstract methods first calls
checkValidity(). Any method could therefore throw an InvalidVisualObjectException
.
This exception extends RuntimeException
, so doesn't have to be explicity declared or
caught. A VisualObject
can become invalid if it is removed from its project, or its
project is closed, and the corresponding VisualObjectListener
message is ignored, for example.
insert
"insertionOperation" value indicating a copy of the object will inserted.
insert
"before" value indicating a copy of the object will be appended at the end
of the parent object's list of children.
insert
"insertionOperation" value indicating the object will be moved from its
current location and inserted in the new location.
VisualObjectListener
to this VisualObject
.
VisualObject
.
VisualObject
corresponds to a valid object in its VisualProject
.
VisualObject
and all its descendents.
VisualObject
to Visual Cafe's clipboard.
VisualObject
to Visual Cafe's clipboard.
VisualProperties
.
VisualProperty
given its internal name.
java.lang.Class
object for this VisualObject
's type.
VisualObject
's type.
VisualProperty
.
VisualProperty
.
Image
for an icon that represents this VisualObject
.
VisualProperties
this VisualObject
has.
VisualObject
's unique numeric ID within its VisualRepository
.
ProjectFile
that contains this VisualObject
.
ProjectFile
that contains this VisualObject
.
VisualProperties
of this object.
VisualProperty
with the specified zero-based index.
VisualProject
that this VisualObject
belongs to.
VisualRepository
that contains this object.
Object
that represents this VisualObject
, with all of the
properties set appropriately.
VisualObject
.
VisualObject
's source file.
VisualObject
corresponds to a valid object in its VisualProject
.
VisualObject
as active in the Property List of Visual Cafe.
VisualObject
as active in the Property List of Visual Cafe.
String
that represents this object.
VisualProperty
in this VisualObject
.
public static final int COPY_OBJECT_OPERATION
insert
"insertionOperation" value indicating a copy of the object will inserted.
public static final com.symantec.itools.vcafe.openapi.VisualObject INSERT_AT_END
insert
"before" value indicating a copy of the object will be appended at the end
of the parent object's list of children.
public static final int MOVE_OBJECT_OPERATION
insert
"insertionOperation" value indicating the object will be moved from its
current location and inserted in the new location.
public static final int VPO_ADDEDVPO_ADDED_TO_TOOLBAR
public static final int VPO_ADDED_TO_TOOLBAR
public static final int VPO_CONTAINER_ONLYVPO_CUSTOMIZER_HIDDENSTATE
public static final int VPO_CUSTOMIZER_HIDDENSTATEVPO_CUSTOM_VIEW
public static final int VPO_CUSTOM_VIEWVPO_DESIGN_TIME_ONLY
public static final int VPO_DESIGN_TIME_ONLYVPO_ERROR
public static final int VPO_ERRORVPO_INVISIBLE
public static final int VPO_INVISIBLE
public static final int VPO_IS_ARRAYVPO_IS_DEFAULT
public static final int VPO_IS_DEFAULTVPO_NOINITDECLCONNTROLS
public static final int VPO_NOINITDECLCONNTROLSVPO_NO_NAME
public static final int VPO_NO_NAMEVPO_PARSER_ONLY
public static final int VPO_PARSER_ONLYVPO_PROJ_TEMPL_FOLDER
public static final int VPO_PROJ_TEMPL_FOLDER
public static final int VPO_ROOT_OBJECT
public static final int VPO_SERIALIZABLE
public static final int VPO_STARTERVPO_USER_OBJECT
public static final int VPO_USER_OBJECT
public VisualObject()
public abstract void addVisualObjectListener(VisualObjectListener listener, boolean children)
VisualObjectListener
to this VisualObject
.
All changes to this VisualObject
(and optionally to its children) are broadcast
to the listeners registered with it.
VisualObject
.
true
if the listener wishes to receive notifications of changes to
this VisualObject
's children as well.
public abstract boolean canInsert(VisualObject object)
true
if this object can contain argument object, false
otherwise.
public abstract boolean canPasteClipboardContents()
VisualObject
.
false
if the clipboard doesn't contain VisualObjects
, or this
VisualObject
cannot accept the VisualObjects
on the clipboard.
public void checkValidity() throws InvalidVisualObjectException
VisualObject
corresponds to a valid object in its VisualProject
.
isValid()
is similar, but returns a boolean value indicating validity instead of throwing an
InvalidVisualObjectException
if the validity check fails.
Note that the implementation of all of VisualObject
's abstract methods first call
checkValidity(). Any method could therefore throw an InvalidVisualObjectException
.
VisualObject
has been removed from its project,
or its project has been closed, for example.
public abstract java.lang.Object clone()
VisualObject
and all its descendents.
The new Object is not added to the project.
VisualObject
.
public abstract void copyToClipboard()
VisualObject
to Visual Cafe's clipboard.
The VisualObject
's toString()
representation is used as the StringSelection
text.
public abstract void copyToClipboard(String textValue)
VisualObject
to Visual Cafe's clipboard.
String
to be used as the StringSelection
text
public abstract void delete()
This visual object is delinked from the parent/child/sibling hierarchy, removed from its project and discarded.
public abstract java.util.Enumeration enumerateProperties()
VisualProperties
. The Enumeration
elements are
VisualProperty
objects. An Enumeration
is returned even if this VisualObject
has no properties.
Enumeration
of VisualProperty
objects.
public abstract com.symantec.itools.vcafe.openapi.VisualObject findChildByName(String name)
null
if none.
public abstract com.symantec.itools.vcafe.openapi.VisualProperty findProperty(String internalPropertyName)
VisualProperty
given its internal name.
Internal names typically begin with "ipn". For example, the internal property name for
JMenuItem.text
is "ipntext".
VisualProperty
or null
if there is no property with that name.
public abstract java.lang.String getClassName()
public abstract java.lang.Class getClassObject() throws ClassNotFoundException
java.lang.Class
object for this VisualObject
's type.
Class
of this object.
public abstract java.lang.String getCustomizerClassName()
VisualObject
. It is a type
of Component.
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass getDTClassObject()
VisualObject
's type.
The Design-Time Reflection package (com.symantec.itools.vcafe.openapi.dtreflect) provides services
analogous to the Java reflection API, but is based upon parse information gathered by Visual Cafe.
Thus, classes reflected upon need not be compiled or in a compilable state.
DTClass
of this object.
public abstract java.lang.String getDefaultName()
getShortClassName()
, but some components describe two
types of objects.
For example, java.awt.Checkbox
can return either "Checkbox" or "RadioButton".
public abstract com.symantec.itools.vcafe.openapi.VisualProperty getDefaultProperty()
VisualProperty
.
This is the property that will be selected in the property list by default.
VisualProperty
, or null
if none.
public abstract java.lang.String getDescription()
public abstract com.symantec.itools.vcafe.openapi.VisualObject getFirstChild()
To traverse a visual object hierarchy downwards, use
getFirstChild()
followed by getSibling()
, recursively.
null
if no children.
public abstract com.symantec.itools.vcafe.openapi.VisualProperty getFirstProperty()
VisualProperty
.
VisualProperty
, or null
if none.
public abstract int getFlags()
public abstract java.awt.Image getIcon(int iconKind)
Image
for an icon that represents this VisualObject
.
VisualObject
.
public abstract java.io.File getJarFile()
public abstract java.lang.String getJarName()
public abstract java.lang.String getName()
public abstract int getNumProperties()
VisualProperties
this VisualObject
has.
VisualProperties
, or 0 if this VisualObject
has no properties.
public abstract int getObjectID()
VisualObject
's unique numeric ID within its VisualRepository
.
The ID can be zero if the the object is not in a VisualRepository
. This can
be the case if a new VisualObject
has just been created an not yet inserted.
VisualRepository
, or zero.
public abstract java.lang.String getPackageName()
public abstract com.symantec.itools.vcafe.openapi.VisualObject getParent()
To traverse a visual object heirarchy upwards, use
getParent()
recursively until isRootObject()
is true
.
The parent of a root object has no visual significance.
null
if no parent.
public abstract com.symantec.itools.vcafe.openapi.ProjectFile getProjectFile()
ProjectFile
that contains this VisualObject
.
ProjectFile
that contains this object, or null
if
this object is in the Component Library.
public abstract int getProjectFileID()
ProjectFile
that contains this VisualObject
.
ProjectFile
that contains this object, or -1
if
this object is in the Component Library.
public abstract com.symantec.itools.vcafe.openapi.VisualProperty[] getProperties()
VisualProperties
of this object. If none exist then a zero-length array is returned.
VisualProperty
objects.
public abstract com.symantec.itools.vcafe.openapi.VisualProperty getProperty(int index)
VisualProperty
with the specified zero-based index.
VisualProperty
object.
ArrayIndexOutOfBoundsException
public abstract com.symantec.itools.vcafe.openapi.VisualObject getRootObject()
isRootObject()
returns true
.
null
if none is found.
public abstract java.lang.String getShortClassName()
public abstract com.symantec.itools.vcafe.openapi.VisualObject getSibling()
null
if none.
public abstract java.lang.String getSuperClassName()
public abstract com.symantec.itools.vcafe.openapi.VisualProject getVisualProject()
VisualProject
that this VisualObject
belongs to.
VisualProject
that contains this object, or null
if this object is in the
Component Library.
public abstract com.symantec.itools.vcafe.openapi.VisualRepository getVisualRepository()
VisualRepository
that contains this object.
This can be a project's Object Library, the Component
Library, or null
if the object hasn't been inserted.
VisualRepository
identifying the Component Library, a VisualProject
's
Object Library, or null
.
public abstract boolean insert(VisualObject object, VisualObject before, int insertOperation)
INSERT_AD_END
, the object is inserted at the end.
MOVE_OBJECT_OPERATION
- to move the object from its current location
and insert it at the new location, or COPY_OBJECT_OPERATION
- to insert a copy of the object
at the new location.
true
if the object was successfully moved/copied, false
if the operation failed.
public abstract java.lang.Object instantiate(PropertyInstanceGetter thePropertyInstanceGetter) throws ClassNotFoundException, InstantiationException, IllegalAccessException
Object
that represents this VisualObject
, with all of the
properties set appropriately.
For example, if this VisualObject
describes a java.awt.Checkbox
,
a new checkbox is created and returned.
Object
defined by this VisualObject
public abstract void invokeEditor()
VisualObject
.
public abstract void invokeSourceEditor()
VisualObject
's source file.
public abstract boolean isInstanceOf(String className)
true
if this object is an instance of className
, false
otherwise.
public boolean isInvisible()
true
if so, false
otherwise.
public abstract boolean isJavaObject()
true
if so, false
otherwise.
public boolean isRootObject()
true
if so, false
otherwise.
public abstract boolean isSameOrChild(VisualObject object)
true
if the object is the same as the argument
object or one of its parents, false
otherwise.
public abstract boolean isValid()
VisualObject
corresponds to a valid object in its VisualProject
.
true
if so, false
otherwise.
public abstract void removeVisualObjectListener(VisualObjectListener listener)
public abstract void setActiveObject()
VisualObject
as active in the Property List of Visual Cafe.
public abstract void setActiveObject(boolean forceDefaultProperty)
VisualObject
as active in the Property List of Visual Cafe.
false
, the previously selected property remains selected
(if it exists for this object).
public java.lang.String toString()
String
that represents this object.
String
.
public abstract java.lang.Object updateInstanceProperty(int propertyIndex, Object instance, PropertyInstanceGetter thePropertyInstanceGetter) throws ClassNotFoundException, InstantiationException, IllegalAccessException
VisualProperty
in this VisualObject
.
null
is returned if the property
was not updated successfully.
propertyIndex
is out of range.
All Packages Class Hierarchy This Package Previous Next Index